package src.com.doit.Demo11;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        Company c = new Company();

        ArrayList<Employee>list = new ArrayList<>();
        Manager e1 = new Manager( "1008611","赵露思",15000,20000);
//        c.show(e1);
        list.add(e1);
        System.out.println("------------------------------------");
        Programmer e2 = new Programmer("1001011","杨幂",15600,56000);
//        c.show(e2);
        list.add(e2);
        c.show(list.get(0));
        c.show(list.get(1));
//        method(list);
    }
    public static void method(ArrayList<Employee>list)
    {
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i).getId()+list.get(i).getName()+list.get(i).getWage());
            list.get(i).calculateWage();
        }
    }
}
